export enum InvoiceTitleType {
  enterprise = 1, // 企业
  individual = 2, // 个人
}

export enum OrderType {
  包车 = 1,
  代叫 = 2,
  捎件 = 3,
}

export function getOrderTypeString(orderType?: OrderType) {
  if (!orderType)
    return ''
  const string = {
    [OrderType.包车]: '包车',
    [OrderType.代叫]: '代叫',
    [OrderType.捎件]: '捎件',
  }
  return string[orderType]
}

export enum IntercityOrderType {
  城际捎件 = 1,
  城际购票 = 2,
}

export function getIntercityOrderTypeString(orderType?: IntercityOrderType) {
  if (!orderType)
    return ''
  const string = {
    [IntercityOrderType.城际捎件]: '城际捎件',
    [IntercityOrderType.城际购票]: '城际购票',
  }
  return string[orderType]
}

export enum OrderStatus {
  待接单 = 1,
  待到达 = 2,
  进行中 = 3,
  已完成 = 4,
  待审核 = 7,
  已取消 = 5,
}

export function getOrderStatusString(orderStatus?: OrderStatus) {
  if (!orderStatus)
    return ''
  const status = {
    [OrderStatus.待接单]: '待接单',
    [OrderStatus.待到达]: '待到达',
    [OrderStatus.进行中]: '进行中',
    [OrderStatus.已完成]: '已完成',
    [OrderStatus.待审核]: '待审核',
    [OrderStatus.已取消]: '已取消',
  }
  return status[orderStatus]
}

export enum IntercityOrderStatus {
  已下单 = 2,
  已完成 = 3,
  待审核 = 5,
  已取消 = 4,
}

export function getIntercityOrderStatusString(intercityOrderStatus?: IntercityOrderStatus) {
  if (!intercityOrderStatus)
    return ''
  const status = {
    [IntercityOrderStatus.已下单]: '已下单',
    [IntercityOrderStatus.已完成]: '已完成',
    [IntercityOrderStatus.待审核]: '待审核',
    [IntercityOrderStatus.已取消]: '已取消',
  }
  return status[intercityOrderStatus]
}
